#include <ros/ros.h>
#include <geometry_msgs/PoseStamped.h>
#include <mavros_msgs/CommandBool.h>
#include <mavros_msgs/SetMode.h>
#include <mavros_msgs/State.h>
#include<std_msgs/Float64.h>
class minimal_publisher
{
private:
    ros::NodeHandle n;
    ros::Publisher my_project;
    std_msgs::Float64 input_float;
    ros::Rate *naptime;
    

public:
    minimal_publisher(/* args */);
    void run();
    ~minimal_publisher();
};
void minimal_publisher::run()
{
    while (ros::ok())
    {
        input_float.data+=0.001;
        my_project.publish(input_float);
        naptime->sleep();
    }
}
minimal_publisher::minimal_publisher(/* args */)
{
    naptime=new ros::Rate(1.0);
    input_float.data=0.0;
    my_project=n.advertise<std_msgs::Float64>("topic1",10);
    

}

minimal_publisher::~minimal_publisher()
{
    delete naptime;
}






int main(int argc,char **argv)
{
    ros::init(argc,argv,"minimal_publisher");
    minimal_publisher m1;
    m1.run();
    
}